import { Controller, UseFilters, UseInterceptors, UsePipes, ValidationPipe, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { Crud, CrudController } from '@nestjsx/crud';
import { Assets } from 'libs/db/entity/assets.entity';
import { HttpExceptionFilter } from '../_filter/http-exception.filter';
import { LoggingInterceptor } from '../_interceptor/logging.interceptor';
import { AssetsCrudOps } from './assets-crud-ops';
import { AssetsService } from './assets.service';
import { AuthGuard } from '@nestjs/passport';


@Crud(AssetsCrudOps)
@UseFilters(HttpExceptionFilter)
@UsePipes(ValidationPipe)
@UseInterceptors(LoggingInterceptor)
@UseGuards(AuthGuard('jwt-web'))
@ApiBearerAuth()
@ApiTags('三资管理 - 资产信息')   //标签
@Controller('assets')
export class AssetsController implements CrudController<Assets> {
  constructor(public service: AssetsService) {
  }
}
